<template>
  <div>
    <!--  订单日志  -->
    <el-dialog
      title="订单日志"
      :visible.sync="open"
      width="70%" @close="close">
      <div class="edit-box">
        <el-table :data="orderLogList" align="center" style="width: 100%" border>
          <el-table-column prop="storeName" align="center" label="店铺名称"></el-table-column>
          <el-table-column prop="orderId" label="订单号" align="center"></el-table-column>
          <el-table-column prop="childOrderId" label="子订单号" align="center"></el-table-column>
          <el-table-column prop="createTime" label="时间" align="center"></el-table-column>
          <el-table-column prop="statusIntro" align="center" label="状态"></el-table-column>
          <el-table-column prop="remark" align="center" label="备注"></el-table-column>
        </el-table>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="close">取 消</el-button>
        <el-button type="primary" @click="close">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import {viewOrderLog} from "@/api/order/orderApi";

export default {
  name: 'order-log',
  props: {
    orderId: {
      type: String / Number
    },
  },
  data() {
    return {
      open: true,
      orderLogList: [],//订单日志列表
    }
  },
  mounted() {
    this.getVoucherInfo()
  },
  methods: {
    // 获取订单日志列表
    getVoucherInfo() {
      viewOrderLog({orderId: this.orderId}).then(res => {
        this.orderLogList = res
        this.isShowOrderLog = true
      })
    },
    // 关闭线上发货弹窗
    close() {
      this.$emit('closeOrderLogModal', false)
    },
  }
}
</script>
<style scoped>

</style>
